import { get, post } from "./request";
class Device {
  // 设备列表
  async postDevice(data) {
    const res = post("middle/klt/device/search", data);
    return res;
  }
  // 列表状态
  async postDeviceStatus(data) {
    const res = post("middle/klt/home/deviceStatus", data);
    return res;
  }
  // 设备数据
  async getDetail(deviceId, start, end) {
    const res = get(
      `middle/klt/device/data?deviceId=${deviceId}&start=${start}&end=${end}`
    );
    return res;
  }

  //设备详情
  getDetailInfo(id, projectId) {
    const res = get(`middle/klt/device/detail/${id}`);
    return res;
  }
}

export default new Device();
